/**
 * 
 */
package com.hfjyz.exam.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.Errors;

import com.hfjyz.exam.command.ExamSearchCommand;
import com.hfjyz.exam.dao.ExamInfoDao;
import com.hfjyz.exam.model.ExamInfo;

/**
 *
 */
public class ExamServiceImpl extends AbstractServiceImpl implements ExamService {
	private ExamInfoDao examInfoDao;

	@SuppressWarnings("rawtypes")
	@Override
	public Map initSearch(HttpServletRequest request, ExamSearchCommand cmd,
			Errors errors) throws Exception {
		// List<ExamInfo> papers = examInfoDao.find(cmd);
		// cmd.setResult(papers);
		return null;
	}

	@Override
	public void search(HttpServletRequest request, ExamSearchCommand cmd)
			throws Exception {
		List<ExamInfo> papers = examInfoDao.find(cmd);
		cmd.setResult(papers);
	}

	/**
	 * @return the examInfoDao
	 */
	public ExamInfoDao getExamInfoDao() {
		return examInfoDao;
	}

	/**
	 * @param examInfoDao
	 *            the examInfoDao to set
	 */
	public void setExamInfoDao(ExamInfoDao examInfoDao) {
		this.examInfoDao = examInfoDao;
	}

}
